package com.jwtproject.bootserver.exception;

import com.jwtproject.bootserver.status.ProjectStatusEnum;
import lombok.Data;

@Data
public class ProjectException extends RuntimeException{

    private static final long serialVersionUID = 5005463776451426691L;
    private String msg;
    private int code;

    public ProjectException(ProjectStatusEnum projectStatusEnum) {
        this.code = projectStatusEnum.getCode();
        this.msg = projectStatusEnum.getMsg();
    }

    public ProjectException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
